home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 201-220 / scopedisk209 / 2.4_commands / readme.doc < prev    next >
Text File  |  1995-03-19  |  8KB  |  242 lines

  1.  
  2.  
  3. Here are a few commands that did not make it into 2.04; however, I've
  4. gotten the go-ahead to distribute them in this fashion;  It's possible
  5. that future versions of the OS will contain updates of these commands.
  6. It's also possible that it won't.
  7.  
  8. These commands are designed for 2.04.  It is possible that future
  9. revisions of the OS will require future revisions of these commands.
  10. (This is why I consider them hacks)
  11.  
  12. Anyway, I've been using them for about a year;  now that everyone
  13. can get 2.04 (and now that I've cleaned the commands up) its time to give you 
  14. the opportunity too.
  15.  
  16. Any bugs you find should be reported directly to me, as well as to Commodore,
  17. for they should not be currently considered Commodore supported.  I will
  18. probably fix the bugs I hear about, though.
  19.  
  20.  
  21.             have fun,
  22.  
  23.             andy finkel
  24.  
  25. -------------------------------------------------------------------
  26.  
  27. History
  28.  
  29.     Template: LINES/N,START/N,LOAD/K,SAVE/K,SIZE/K/N,RUN/S,CLEAR/S,SHOW/S,NONUM/S
  30.  
  31.  
  32. The HISTORY command is used to control the 2.04 console handler history features.  
  33. This command allows you to review, load, save, clear, and change the size of the 
  34. history buffer.  In addition, the command allows you to re-execute portions of the
  35. history  buffer without using the cursor keys.
  36.  
  37. The history command can be used to display the current history buffer just
  38. by using the command
  39.  
  40. history
  41.  
  42. To see the last N entries in the history buffer, you also the number, eg
  43. history 10 will show you the last 10 entries. (You can also say
  44. history LINES 10).
  45.  
  46. To see N entries in the history buffer, starting with entry X, you would specify 
  47. both numbers, eg
  48.  
  49. history 8 20
  50.  
  51. which will display 20 history lines starting with history entry # 8.
  52. (you can also say HISTORY LINES 8 START 20)
  53.  
  54. On the left margin of the history listing is the command histry number.  To supress
  55. those numbers, use the NONUM keyword. (this is often useful when redirecting the 
  56. output of the history cmmand into a file or a pipe.
  57.  
  58. The LOAD keyword allows you to preload the history buffer, up to the limits of the 
  59. current size of the history buffer.
  60.  
  61. SAVE saves the current history buffer to a file.  NOTE: partial saves are possible,
  62. following the same rules as partial listings of the history buffer.
  63.  
  64. The CLEAR keyword erases the contents of the history buffer.  It may be used by 
  65. itself, or with one of the other keywords.
  66.  
  67. The SIZE keyword allows you to change the size of the history buffer of the
  68. current console-handler.  You can change the size in 1K increments.  The initial
  69. history buffer size is 2K.
  70.  
  71. The RUN keyword allows you to run one or more commands in the history buffer.
  72.  
  73. history run 5
  74.  
  75. will run command 5.
  76. history run 5 3
  77. will run 3 commands, starting with the 5th entry in the history buffer.
  78.  
  79. a useful alias is
  80.  
  81. alias ! history lines 1 run start 
  82.  
  83. which kind of gives that Unix csh effect.
  84.  
  85. The SHOW option is there as a default; it can be combined with other options,
  86. however.
  87.  
  88. -------------------------------------------------------------------
  89.  
  90. Pipe
  91.  
  92.     Template:  COMMAND/F
  93.  
  94. The PIPE command is like the RUN command, with several differences.  The PIPE 
  95. command is designed to run several commands at a time, redirecting the output of 
  96. one into the input of the next.
  97.  
  98. The PIPE command can also be used to run multiple commands; but its main use is 
  99. for the piping.
  100.  
  101. Commands are separated by the vertical bar character (|) for a pipe operation, ie
  102.  
  103. pipe list sys: | more
  104.  
  105. NOTE: use of redirection in commands will prevent the proper transfer of output 
  106. from one command to the next.
  107.  
  108.  
  109. All the commands in the PIPE command line are run asynchronously, except
  110. the last one;  synchronization is provided by the blocking pipes provided
  111. by the queue-handler.
  112.  
  113. The pipe command works best with commands that will look to standard input for 
  114. input, and send output to standard output.  Unfortunately, many Amiga programs do 
  115. not do this;  instead they demand an input file (and sometimes even an output file)
  116. Rather than just not work with those commands, the PIPE command supplies two fake 
  117. file handles, similar to the NIL: file handle, called IN: and OUT:, representing 
  118. the data from the preceeding command and the output to the next command.  Thus it 
  119. becomes possible to  use commands like:
  120.  
  121. pipe list | sort in: out: | more
  122.  
  123.  
  124. or
  125.  
  126. pipe list #?.c lformat="rlog %n" | execute in:
  127.  
  128.  
  129. It is often convienent to define an alias for commands that you use
  130. frequently with pipes that require in: and out:, ie
  131.  
  132. alias psort sort in: out:
  133.  
  134. will allow you to do things like:
  135.  
  136. pipe list lformat=%n | psort | more
  137.  
  138.  
  139. You can even do things like:
  140.  
  141. alias plist pipe list lformat=%n | psort | more
  142.  
  143. Now you have an alias that does a sorted list through the more command.
  144.  
  145.  
  146. To use The PIPE command for multiple commands, the individual commands are 
  147. seperated by the \ rather than the |.  Output is not passed from one stage
  148. to the next.  In the current implementation, each command is run in
  149. a seperate subshell;  this is subject to change in a future revision.
  150.  
  151.  
  152. The PIPE command allows you to change the pipe (and multiple command)
  153. characters.  PIPE looks at the shell variables __pchar and __mchar
  154. (note the 2 underscores) for pipe character and multiple character.
  155. You can use any one or two character combination, ie
  156.  
  157. set __pchar ||
  158.  
  159. will set your pipe character(s) to two vertical bars.
  160.  
  161.  
  162. Pipe is best used as a resident command.
  163.  
  164. Note:  If you put a RUN in a PIPE command line you probably won't get
  165.        quite what you expect, as all the commands are already being
  166.        run in the background.
  167.  
  168.        If you control-C out of a PIPE operation, (or if there is some other
  169. problem like a mistyped command) you will see the message "broken pipe",
  170. and the pipe will drain;  if the commands have produced a lot of output,
  171. this may take a few seconds, as the current implementation of the queue-handler
  172. does not support a 'flush pipe' operation.
  173.  
  174.     Also, only the last command in the pipe receives the control-C.
  175. (Originally, pipe sent a control-C to every command in the pipe;  some
  176. commands got upset)  If you need to, you can find the other commands
  177. by using the status command, and can issue them a BREAK manually. 
  178.  
  179.  
  180. -------------------------------------------------------------------
  181.  
  182.  
  183. Recorder
  184.  
  185.     Template: TO=ON,PROCESS/K/N,APPEND/S,OFF/S
  186.  
  187.  
  188. The Recorder command is used to capture all the input and output in a particular
  189. shell and save it to a file.
  190.  
  191.  
  192. To use the recorder, merely type its name, ie
  193.  
  194. recorder
  195.  
  196.  
  197. will activate the recorder, sending its output to the default file called
  198. "recorder.output"
  199.  
  200.  
  201. If you wanted to use a different file name, you could have said:
  202.  
  203. recorder ram:work.in.progress
  204.  
  205. And the output would have been send to the file ram:work.in.progress
  206.  
  207.  
  208.  
  209. To stop the recorder, the OFF option is used, ie
  210.  
  211.  
  212. recorder OFF
  213.  
  214. This must be issued in the same shell that invoked the recorder.
  215.  
  216.  
  217. To append new information to an existing file, the APPEND keyword is used, ie
  218.  
  219.  
  220. recorder ram:work.in.progress append
  221.  
  222.  
  223. will add new information to the already existing file.  This command
  224. can be issued after a recorder OFF command;  In this way you can start
  225. and stop the recorder at will.
  226.  
  227. Note:  The recorder process can also be stopped by sending it a break
  228.        signal.  This would be required to properly close the recorder
  229.        output file if you inadvertently close the shell while the
  230.        recorder is running.  In that case, the shelll window would not
  231.        close until you found the recorder process by using the STATUS
  232.        command from another shell, and used the BREAK command to
  233.        send the recorder process a control-C.
  234.  
  235.  
  236. The Process keyword is used internally by recorder.
  237.  
  238. Recorder should not be RUN, as it attaches to the current process, so is
  239. generally not useful in its own short-lived process.
  240.  
  241. Recorder is based on ideas from Phillip Lindsey and David Cervone.
  242.